Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods / ODTransform


SetMatrix

The SetMatrix method replaces this transform's matrix with the specified matrix.

ODTransform SetMatrix (in ODMatrix matrix);
matrix
The new transform matrix for this transform.
return value
A reference to this transform with it matrix replaced.
DISCUSSION
If you specify an identity matrix, the effect of this method is the same as calling the Reset method.

If you use transforms of the class ODTransform and you have also created a subclass of ODTransform that applies complex transformation effects that cannot be represented by matrices, your part needs to check whether a given transform has a matrix before calling this method. To do so, you should call the transform's HasMatrix method; only if that method returns true should you call the transform's SetMatrix method.

OVERRIDING
If you subclass ODTransform to create a nonlinear transform class, you must override this method. Your override method must not call its inherited method. Instead, it should raise a kODErrTransformErr exception. You can detect that a transform of your class has no matrix by calling its HasMatrix method.

EXCEPTION
kODErrTransformErr
This transform object does not use a matrix.
SEE ALSO
The ODMatrix type (page 888).
The ODTransform::GetMatrix method (page 768).
The ODTransform::HasMatrix method (page 772).
The ODTransform::Reset method (page 781).


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help